﻿/* v0.0.1 2016-09-19 by majie */
!function(paramFunctionItems){
	/** !1=false **/
	/** !0=true **/
	/**
	*@根据方法名来执行方法
	**/
	function executionMethod(paramFunctionItemName){
		if(paramFunctionItemsCache[paramFunctionItemName]){
			return paramFunctionItemsCache[paramFunctionItemName].exports;
		}
		/**保存将要执行的函数的方法名**/
		var _selfFunctionStructureParam={
			exports : {},
			id : paramFunctionItemName,
			loaded : !1
		};
		var _selfFunctionStructure=paramFunctionItemsCache[paramFunctionItemName]=_selfFunctionStructureParam;
		_selfFunctionStructure.loaded = !0;
		/**Call是将this指针指向方法的第一个参数**/
		paramFunctionItems[paramFunctionItemName].call(_selfFunctionStructure.exports, _selfFunctionStructure, _selfFunctionStructure.exports, executionMethod);
		return _selfFunctionStructureParam.exports;
	}
	/**
	* 保存方法的执行中状态
	*/
	var paramFunctionItemsCache={};
	/**@函数方法主入口**/
	!function(){
		/**初始化执行initLoadPageFunction方法**/
		executionMethod("structureIndexPageElement");
	}();
}({
	/**@将<style></style>标签添加到<head></head>标签中**/
	pushLoadElementStyleToHeader:function(paramOne,paramTwo,executionMethod){
		/**@函数内部变量**/
		var l = {};
		/**@将<style>标签添加到<head>标签中**/
		function e(a) {
            for (var b = [], c = {},
            d = 0; d < a.length; d++) {
                var e = a[d],
                f = e[0],
                g = e[1],
                h = e[2],
                i = e[3],
                j = {
                    css: g,
                    media: h,
                    sourceMap: i
                };
                c[f] ? c[f].parts.push(j) : b.push(c[f] = {
                    id: f,
                    parts: [j]
                })
            }
            return b
        }
		/****/
		function d(a,b){
			for (var c = 0; c < a.length; c++) {
				/**{id: "structureLoadElementCss", parts: Array[1]}**/
                var d = a[c],
                e = l[d.id];
                if (e) {
                    e.refs++;
                    for (var f = 0; f < e.parts.length; f++) e.parts[f](d.parts[f]);
                    for (; f < d.parts.length; f++) e.parts.push(demo(d.parts[f], b))
                } else {
                    for (var g = [], f = 0; f < d.parts.length; f++) g.push(demo(d.parts[f], b));
                    l[d.id] = {
                        id: d.id,
                        refs: 1,
                        parts: g
                    }
                }
            }
		}
		/**@**/
		function demo(a, b) {
			/**== equality 等同,=== identity 恒等**/
			/**==,两边值类型不同的时候,要先进行类型转换,再比较**/
			/**===,不做类型转换,类型不同的一定不等**/
			/** "==" 只要求值相等; "===" 要求值和类型都相等**/
            var c, d, e;
            if (b.singleton) {
                var h = q++;
                c = p || (p = obtainStyleTag()),
				/**bind方法类似于call()方法**/
                d = i.bind(null, c, h, !1),
                e = i.bind(null, c, h, !0)
            } else a.sourceMap && "function" == typeof URL && "function" == typeof URL.createObjectURL && "function" == typeof URL.revokeObjectURL && "function" == typeof Blob && "function" == typeof btoa ? (c = g(), d = k.bind(null, c), e = function() {
                c.parentNode.removeChild(c),
                c.href && URL.revokeObjectURL(c.href)
            }) : (c = obtainStyleTag(), d = test.bind(null, c), e = function() {
                c.parentNode.removeChild(c)
            });
            return d(a),
            function(b) {
                if (b) {
                    if (b.css === a.css && b.media === a.media && b.sourceMap === a.sourceMap) return;
                    d(a = b)
                } else e()
            }
        }
		/**@获取<style>标签**/
		function obtainStyleTag() {
			/**保存<style>标签**/
            var paramStyleElement = document.createElement("style");
            var paramHeadElement = obtainHeadElement();
            paramStyleElement.type = "text/css";
            paramHeadElement.appendChild(paramStyleElement);
            return paramStyleElement;
        }
		/**@**/
		function test(a, b) {
            var c = b.css,
            d = b.media;
            b.sourceMap;
            if (d && a.setAttribute("media", d), a.styleSheet) a.styleSheet.cssText = c;
            else {
                for (; a.firstChild;) a.removeChild(a.firstChild);
                a.appendChild(document.createTextNode(c))
            }
        }
		/****/
		var execChildMethodFunc = function(childParamMethod) {
            var paramChildExecMethod;
            return function() {
                "undefined" == typeof paramChildExecMethod && (paramChildExecMethod = childParamMethod.apply(this, arguments));
                return paramChildExecMethod;
            }
        },
		/**@获得html文档中的<head></head>标签**/
		obtainHeadElement = execChildMethodFunc(function() {
            return document.head || document.getElementsByTagName("head")[0];
        }),
		obtainSingleton = execChildMethodFunc(function() {
            return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
        }),
		/**@构造<style></style>标签**/
		createStyleElement = function (){
			var returnParamStyleElement = document.createElement("style"),
            paramHeadElement = obtainHeadElement();
            returnParamStyleElement.type = "text/css";
            paramHeadElement.appendChild(returnParamStyleElement);
            return returnParamStyleElement;
		},
		/**@构造<link>标签**/
		createLinkElement = function(){
			var paramLinkElement = document.createElement("link"),
            paramHeadElement = obtainHeadElement();
            paramLinkElement.rel = "stylesheet";
            paramHeadElement.appendChild(paramLinkElement);
            return paramLinkElement;
		},
		createCssStyleArray = function(childParam){
			var b=[];
			var c={};
			var point=0;
			for(point;point<childParam.length;point++){
				var _selfParam=childParam[point];
				/**paramMethodId=structureLoadElementCss**/
				var paramMethodId = _selfParam[0];
				/**paramCssString=css样式代码**/
                var paramCssString = _selfParam[1];
                var h = _selfParam[2];
                var i = _selfParam[3];
                var j = {
                    css: paramCssString,
                    media: h,
                    sourceMap: i
                };
				if(c[paramMethodId]){
					c[paramMethodId].parts.push(j);
				}else{
					b.push(c[paramMethodId] = {
						id: paramMethodId,
						parts: [j]
					});
				}
			}
			return b;
		};
		paramOne.exports = function(childParamA,childParamB){
			childParamB = childParamB || {},
		    "undefined" == typeof childParamB.singleton && (childParamB.singleton = obtainSingleton());
            var c=createCssStyleArray(childParamA);
			d(c, childParamB);
			
		};
	},
	structureLoadElementStyle:function(paramOne,paramTwo,executionMethod){
		var elementStyleItems=new Array();
		elementStyleItems.push("structureLoadElementCssStyle");
		elementStyleItems.push("structureIndexElementCssStyle");
		for(var point=0;point<elementStyleItems.length;point++){
			var paramStructureLoadElementStyle = executionMethod(elementStyleItems[point]);
			"string" == typeof paramStructureLoadElementStyle && (paramStructureLoadElementStyle = [[paramOne.id, paramStructureLoadElementStyle, ""]]);
			executionMethod("pushLoadElementStyleToHeader")(paramStructureLoadElementStyle, {});
		}
	},
	structureIndexPageElement:function(paramOne,paramTwo,executionMethod){
		executionMethod("structureLoadElementStyle");
		
		/**获取构造页面样式的方法**/		
		var paramPageMethod=executionMethod("obtainSTRUCTUREH5INDEXTEMPLATE");
		var headerDom=paramPageMethod.selfStructureIndexPageheader();
		document.body.appendChild(headerDom);
	
		executionMethod("calculationBodySize");
		paramPageMethod=executionMethod("obtainParamAppElement");
		paramPageMethod.definePage("index",function(){
			 this.show.meanwhile(function() {
				
			}),
			this.show.ready(function() {
				
			})
		});
		paramPageMethod=executionMethod("obtainParamCtrlElement");
		/*
		var a= window.document.html;
		var b = new paramPageMethod.scrollView(a, {
            downgrade: !1,
            useFrameAnimation: !1
        });
        b.fixed.topElement = a.querySelector("header");
		b.fixed.enable = !0;*/
		paramPageMethod=executionMethod("obtainParamWindowElement");
		paramPageMethod.CloseSlogan();
	},
    calculationBodySize:function(paramOne,paramTwo,executionMethod){
		var paramPageMethod=executionMethod("obtainParamLibElement");
		var i = window;
		var j = i.document;
		/**@window.addEventListener("resize",function)监听窗口改变事件**/
		i.addEventListener("resize",
		function(a) {
			var c = j.documentElement.getBoundingClientRect();
			j.body.style.width = c.width + "px";
			j.body.style.height = c.height + "px";
		},
		!1)
	},
	structurePagelayoutElement:function(paramOne,paramTwo,executionMethod){
		
	},
	structureIndexElementCssStyle:function(paramOne,paramTwo,executionMethod){
		/**生成页面所需要的css样式代码**/
        var indexElementCssItemArr=[];
        /**push样式到loadElementStyle数组变量中**/	
		/**slogan:标语**/
        indexElementCssItemArr.push('@charset "utf-8";');
		var strLoadElementStyle = indexElementCssItemArr.join('\n');
		var functionTenParam=executionMethod(3);
		paramTwo = paramOne.exports = functionTenParam(),
		paramTwo.push([paramOne.id,strLoadElementStyle]);
	},
	structureLoadElementCssStyle:function(paramOne,paramTwo,executionMethod){
		/**生成页面所需要的css样式代码**/
        var loadElementCssItemArr=[];
        /**push样式到loadElementStyle数组变量中**/	
		/**slogan:标语**/
        loadElementCssItemArr.push('@charset "utf-8";');
		loadElementCssItemArr.push('html,body{padding:0;margin:0}');
		/**@div class="view"  name="index" 元素的样式**/
        loadElementCssItemArr.push('body > .view[name="index"]{background-color: #EEE;}');
		loadElementCssItemArr.push('body > .view[name="index"] .none{display: none;}');
		loadElementCssItemArr.push('body > .view[name="index"] a:hover{text-decoration: none;}');
		/**@**/
		loadElementCssItemArr.push('body > .view[name="index"] header{width: 100%;background-color: #007ee2;}');
		/**@**/
		loadElementCssItemArr.push('body > .view[name="index"] header .header-wrap{width: 100%;box-sizing: border-box;padding-right: 0.2rem;padding-left: 37px;padding-top: 6px;padding-bottom: 6px;background-image: url();background-repeat: no-repeat;background-size: 27px 20px;background-position: 4.5px center;}');
		loadElementCssItemArr.push('body > .view[name="index"] header .header-wrap #search-placeholder{width: 100%;box-sizing: border-box;background-color: #007ee2;text-align: center;border-radius: 4px;}');
		loadElementCssItemArr.push('body > .view[name="index"] header .header-wrap #search-placeholder span{height: 25px;line-height: 25px;font-size: 13px;display: inline-block;color: #FFFFFF;}');
		/**@ header元素在像素比为1时样式列表**/
		loadElementCssItemArr.push('body > .view[name="index"] [data-dpr="1"] header .header-wrap{padding-left: 37px;padding-top: 6px;padding-bottom: 6px;background-size: 27px 20px;background-position: 4.5px center;}');
		loadElementCssItemArr.push('body > .view[name="index"] [data-dpr="1"] header .header-wrap #search-placeholder{border-radius: 4px;}');
		loadElementCssItemArr.push('body > .view[name="index"] [data-dpr="1"] header .header-wrap #search-placeholder span{height: 25px;line-height: 25px;font-size: 13px;}');
		loadElementCssItemArr.push('body > .view[name="index"] [data-dpr="1"] header .header-wrap #search-placeholder span:before{font-size: 15px;margin-right: 5px;}');
		/**@ header元素在像素比为2时样式列表**/
		loadElementCssItemArr.push('body > .view[name="index"] [data-dpr="2"] header .header-wrap{padding-left: 74px;padding-top: 12px;padding-bottom: 12px;background-size: 54px 40px;background-position: 9px center;}');
		loadElementCssItemArr.push('body > .view[name="index"] [data-dpr="2"] header .header-wrap #search-placeholder{border-radius: 8px;}');
		loadElementCssItemArr.push('body > .view[name="index"] [data-dpr="2"] header .header-wrap #search-placeholder span{height: 50px;line-height: 50px;font-size: 26px;}');
		loadElementCssItemArr.push('body > .view[name="index"] [data-dpr="2"] header .header-wrap #search-placeholder span:before{font-size: 30px;margin-right: 10px;}');
		/**@ header元素在像素比为3时样式列表**/
		loadElementCssItemArr.push('body > .view[name="index"] [data-dpr="3"] header .header-wrap{padding-left: 111px;padding-top: 18px;padding-bottom: 18px;background-size: 81px 60px;background-position: 13.5px center;}');
		loadElementCssItemArr.push('body > .view[name="index"] [data-dpr="3"] header .header-wrap #search-placeholder{border-radius: 12px;}');
		loadElementCssItemArr.push('body > .view[name="index"] [data-dpr="3"] header .header-wrap #search-placeholder span{height: 75px;line-height: 75px;font-size: 39px;}');
		loadElementCssItemArr.push('body > .view[name="index"] [data-dpr="3"] header .header-wrap #search-placeholder span:before{font-size: 45px;margin-right: 15px;}');
		/**拼装CSS样式列表**/
		var strLoadElementStyle = loadElementCssItemArr.join('\n');
		var functionTenParam=executionMethod(3);
		paramTwo = paramOne.exports = functionTenParam(),
		paramTwo.push([paramOne.id,strLoadElementStyle]);
	},
	3 : function(a, b) {
        a.exports = function() {
            var a = [];
            return a.toString = function() {
                for (var a = [], b = 0; b < this.length; b++) {
                    var c = this[b];
                    c[2] ? a.push("@media " + c[2] + "{" + c[1] + "}") : a.push(c[1])
                }
                return a.join("")
            },
            a.i = function(b, c) {
                "string" == typeof b && (b = [[null, b, ""]]);
                for (var d = {},
                e = 0; e < this.length; e++) {
                    var f = this[e][0];
                    "number" == typeof f && (d[f] = !0)
                }
                for (e = 0; e < b.length; e++) {
                    var g = b[e];
                    "number" == typeof g[0] && d[g[0]] || (c && !g[2] ? g[2] = c: c && (g[2] = "(" + g[2] + ") and (" + c + ")"), a.push(g))
                }
            },
            a
        }
    },
	obtainSTRUCTUREH5INDEXTEMPLATE:function(paramOne,paramTwo,executionMethod){
		paramTwo["default"] = window.STRUCTURE_H5INDEX_TEMPLATE;
        paramOne.exports = paramTwo["default"];
	},
	obtainParamWindowElement:function(paramOne,paramTwo,executionMethod) {
		paramTwo["default"] = window;
		paramOne.exports = paramTwo["default"];
	},
	obtainParamCtrlElement:function(paramOne,paramTwo,executionMethod) {
		paramTwo["default"] = window.ctrl;
		paramOne.exports = paramTwo["default"];
	},
	obtainParamLibElement:function(paramOne,paramTwo,executionMethod){
		paramTwo["default"] = window.lib;
        paramOne.exports = paramTwo["default"];
	},
	obtainParamAppElement:function(paramOne,paramTwo,executionMethod){
		paramTwo["default"] = window.app;
        paramOne.exports = paramTwo["default"];
	}
	
});